package com.wyw.design.model.learning.behavioral.emptyobject;

import java.util.Optional;

/**
 * @Title   用户类
 * @Description
 * @Author Mr Wu yewen.wu.china@gmail.com
 * @Date 2023/4/19 15:31
 * Update History:
 * Author        Time            Content
 */
public class User {
    public User(Address address) {
        this.address = address;
    }

    private Address address;

    public Optional<Address> getAddress() {
        return Optional.ofNullable(address);
    }

    public void setAddress(Address address) {
        this.address = address;
    }
}
